Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: LAMMPS to Gromacs Conversion Issues #396

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Jeet-Majumdar
Copy link

Implementation of opls dihedrals and cvff improper

Added few lines of code to correctly implement the conversion; which otherwise was throwing errors.

Input files:
files can be found inside zip:
lammps_input_files_and_correct_conversions.zip:

  1. UNK_8742A6.lmp (From Ligpargen )
  2. in.lammps

Command: python InterMol/intermol/convert.py --lmp_in in.lammps --gromacs

error_opls_dihedral_cvff_improper


Now lets say we remove the dihedral information from the LAMMPS input script and data file (which were resulting errors)

New Input files:
files can be found inside zip: modified_lammps_input_files_and_incorrect_conversion_in_harmonic_bond_coefficients.zip:

  1. UNK_8742A6_modified.lmp
  2. in.lammps_modified

Command: python InterMol/intermol/convert.py --lmp_in in.lammps_modified_ --gromacs

Although this does the conversion, but the harmonic bond coefficient (k: force constant) is wrong. It is supposed to be multiplied by 2, which the current version is not doing because of a bug in the implementation.

Comparisons are made between in_converted.top (that is generated by intermol) and UNK_8742A6.itp.
The files UNK_8742A6.itp and UNK_8742A6.lmp were both obtained from Ligpargen server for a single Ethanol molecule.

Ligpargen is a popular tool to do OPLS-AA parameterization of molecules, and it gives parameters of Ethanol molecule in both formats, LAMMPS as well as Gromacs.
Here I have taken their their LAMMPS format (UNK_8742A6.lmp) and used Intermol to convert it into Gromacs (in_converted.top). This converted intermol output is then compared with the Ligpargen given Gromacs parameters (UNK_8742A6.itp).

Harmonic style bond coefficients

In intermol/lammps/lammps_parser.py, line number 92 and 95, the comparison was between incorrect types.
As a result the canonical_force_scale was never never multiplied during the conversion.
This was however correctly done in the case of angle coefficient conversions. I have followed similar implementation style to correct the bond part now.

Also implemented the parsing and conversion of OPLS dihedral and cvff impropers.

The correct conversions and their comparison can be found in the zip: lammps_input_files_and_correct_conversions.zip
The correct conversion results are provided in the same zip, which can be compared with UNK_8742A6.itp

Request maintainers to please have a look into the attached zip files and the modifications that are done here.

Thanks,
Jeet

lammps_input_files_and_correct_conversions.zip
modified_lammps_input_files_and_incorrect_conversion_in_harmonic_bond_coefficients.zip
ligpargen_files_Ethanol.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant